package com.horsecoder.im.common.protocol;

import java.util.Map;

/**
 * Author: Zhu yuhan
 * Email: zhuyuhan2333@qq.com
 * Date: 2022/3/16 11:19 上午
 **/
public abstract class BaseMessage implements Message{

    private String id;

    private String type;

    private String transferType;

    private String message;

    private String identity;

    private String receiver;

    private String url;

    private Map<String, String> metadata;

    public BaseMessage(String id, String type, String transferType, String message, String identity, String receiver, String url) {
        this.id = id;
        this.type = type;
        this.transferType = transferType;
        this.message = message;
        this.identity = identity;
        this.receiver = receiver;
        this.url = url;
    }

    public BaseMessage(String id, String type, String transferType, String message, String identity, String receiver, String url, Map<String, String> metadata) {
        this.id = id;
        this.type = type;
        this.transferType = transferType;
        this.message = message;
        this.identity = identity;
        this.receiver = receiver;
        this.url = url;
        this.metadata = metadata;
    }

    public BaseMessage() {
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getIdentity() {
        return identity;
    }

    public void setIdentity(String identity) {
        this.identity = identity;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Map<String, String> getMetadata() {
        return metadata;
    }

    public void setMetadata(Map<String, String> metadata) {
        this.metadata = metadata;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getTransferType() {
        return transferType;
    }

    public void setTransferType(String transferType) {
        this.transferType = transferType;
    }
}
